$("#power-compare").click(function(){
    var href = "", n = 0;
    for (var i = 0; i < 11; i++) {
      var elem = $("#power-"+i);
      if (elem.obj() != null && ((elem.obj().type == "hidden") || (elem.obj().type == "checkbox" && elem.obj().checked))) {href += "/"+elem.value(); n++}
    }
    if (href != "" && n > 1) {window.location.href = "/compare"+href;}
    return 0; 
});
$("#sell-all").click(function() {   
    for (var i = 0; i < 11; i++) {
      var elem = $("#power-"+i);
      if (elem.obj() != null) {elem.obj().checked = this.checked;}
    }
    return 0;
});